package com.pine.app.module.security.core.common;



/**
 * 公用配置
 * @author xyjxust
 * @create 2019/3/14 16:26
 **/
public class AuthConstant   {

    /**
     * 缓存命名空间
     */
    public static final String CACHE_NAMESPACE = "PINE:";

    //最大登陆错误次数
    public  static final Integer LOGIN_ATTEMP_TIMES = 5;
    //缓存过期时间，默认为一天
    public  static final Long  LOGIN_ATTEMP_EXPIRE = 30 * 60 * 1000L;


    public  static final String access_token  = "access_token";
    public  static final String refresh_token = "refresh_token";
    public  static final String grant_type    = "grant_type";
    public  static final String scope         = "scope";
    public  static final String client_id     = "client_id";
    public  static final String client_secret = "client_secret";
    public  static final String authorization = "Authorization";
    public  static final String redirect_uri  = "redirect_uri";
    public  static final String response_type = "response_type";
    public  static final String state         = "state";
    public  static final String code          = "code";
    public  static final String username      = "username";

    public  static final String auth_type      = "auth_type";

    @SuppressWarnings("all")
    public  static final  String password      = "password";

    public  static final  String token_type      = "token_type";

    public  static final  String token_type_value      = "Bearer";


    public static final String expire_in = "expire_in";

    public static final  String REDIRECT_URI_PREFIX = "redirect:";

    public static final  String DEFAULT_LOGIN_ERROR_KEY = "errorMsg";

    public static final String DEFAULT_LOGIN_PATH = "/oauth/login";

    public static  String DEFAULT_LOGIN_PAGE = "login";

    public static  String DEFAULT_LOGIN_ERROR_PAGE = "login";

    public static final String APP_NAME_KEY = "appName";

    public static final String OAUTH_SERVER_COOKIE_KEY = "p_tgt";



    /**
     * 系统运行模式
     */
    public interface SYSTEM_MODE {
        /**
         * 开发模式
         */
        String DEVELOP = "dev";
        /**
         * 测试模式
         */
        String TEST = "test";
        /**
         * 生产模式
         */
        String PRODUCT = "pro";

    }



}
